//Documentation complete
/**
 * @author Alex
 * @version 2009AP06
 */

package problemDomain;

import java.io.Serializable;

/**
 * A problem domain object.
 */
public interface Bean extends Serializable {
	
	/* Constructors */
	
	/**
	 * All beans should implement a default constructor
	 */
	
	/* END Constructors */
	
	
	/* Methods */
	
	/**
	 * Checks if the <code>Bean</code> is valid an returns <code>true</code> if it is.
	 * @return <code>true</code> if the <code>Bean</code> is valid
	 * @throws ErrorBean if the <code>Bean</code> is not valid
	 */
	public abstract boolean isValid () throws ErrorBean;
	
	/**
	 * Returns an XML <code>String</code> representation of the <code>Bean</code>. 
	 * @return the XML <code>String</code> representation
	 */
	public abstract String toXML ();
	
	/* END Methods */
	
}
